import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

// 路由配置 5+2
// 2 ==> 确定 路由规则 + 路由懒加载
//   ==> 确定出口 router-view

// 1 login layout
// 2 article dashboard

const routes = [
  {
    path: '/login',
    component: () => import('@/views/login')
  },

  {
    path: '/',
    component: () => import('@/views/layout'),
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/帝可得home')
      },
      {
        path: '/business',
        component: () => import('../views/task/1运营工单business.vue')
      },
      {
        path: '/operation',
        component: () => import('../views/task/2运维工单operation.vue')
      },
      {
        path: '/regin',
        component: () => import('../views/node/1区域管理regin.vue')
      },
      {
        path: '/node',
        component: () => import('../views/node/2点位管理node.vue')
      },
      {
        path: '/partner',
        component: () => import('../views/node/3合作商管理partner.vue')
      },
      {
        path: '/index',
        component: () => import('../views/vm/1设备管理index.vue')
      },
      {
        path: '/status',
        component: () => import('../views/vm/2设备状态status.vue')
      },
      {
        path: '/type',
        component: () => import('../views/vm/3设备类型管理type.vue')
      },
      {
        path: '/index1',
        component: () => import('../views/user/1人员列表index.vue')
      },
      {
        path: '/stats',
        component: () => import('../views/user/2人效统计stats.vue')
      },
      {
        path: '/work',
        component: () => import('../views/user/3工作量列表work.vue')
      },
      {
        path: '/classs',
        component: () => import('../views/sku/1商品类型classs.vue')
      },
      {
        path: '/sku',
        component: () => import('../views/sku/2商品管理sku.vue')
      },
      {
        path: '/index2',
        component: () => import('../views/policy/策略管理index.vue')
      },
      {
        path: '/index3',
        component: () => import('../views/order/订单管理index.vue')
      },
      {
        path: '/index4',
        component: () => import('../views/report/对账统计index.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
